﻿<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--    <meta http-equiv="refresh" content="30">-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection" />
    <title>卡门新开店跟进表</title>
    <link href="css/index.css" rel="stylesheet" type="text/css">
    <script src="js/jquery-1.8.1.min.js" type="text/javascript"></script>
</head>
<body>
    <!-- -------------摇奖排行榜---------------  -->
    <div class="Top_Record">
        <div style="width: 100%">
            <div class="record_Top">
                <p>
                    卡门装修进度一览表</p>
            </div>
            <div style="float: left; line-height: 80px; font-size: 36px; text-align: center;margin: 30px auto">
                <span>正在施工数量</span>
                <span id="Span1" style="background: red; -moz-border-radius: 50px; -webkit-border-radius: 50px;
                    border-radius: 50px; padding:10px; margin:10px;font-size:58px;">00</span>家
            </div>
            <div style="float: left; line-height: 80px; font-size: 36px; text-align: center;margin: 30px 30px;">
                <span>待进场数量</span>
                <span id="shopcount" style="background: red; -moz-border-radius: 50px; -webkit-border-radius: 50px;
                    border-radius: 50px; padding:10px; margin:10px;font-size:58px;">00</span>家
            </div>
        </div>
        <div class="topRec_List">
            <dl>
                <dd>
                    序号</dd>
                <dd>
                    名称</dd>
                <dd>
                    进场时间</dd>
                <dd>
                    面积</dd>
                <dd>
                    交场时间</dd>
                <dd>
                    备注</dd>
            </dl>
            <div class="maquee">
                <ul id="shoplist">
                    <!--<li>
                        <div>
                            1</div>
                        <div>
                            岚县秀荣街店北京路265号店</div>
                        <div>
                            12/30 14:20</div>
                        <div>
                            300</div>
                        <div>
                            12/30 14:20</div>
                        <div>
                            12/30 14:20改为12/30 14:20</div>
                    </li>-->
                </ul>
            </div>
        </div>
    </div>
    <div class="apple" style="display:none;">
        <ul>
            <li><a href="#" target="_blank">说明：列表数据8秒滚动一次，30秒更新一次！ </a></li>
            <li><a href="#" target="_blank">你是我的小丫小苹果 </a></li>
            <li><a href="#" target="_blank">怎么爱你都不嫌多</a></li>
            <li><a href="#" target="_blank">红红的小脸儿温暖我的心窝 </a></li>
            <li><a href="#" target="_blank">点亮我生命的火 火火火火</a></li>
            <li><a href="#" target="_blank">你是我的小丫小苹果 </a></li>
            <li><a href="#" target="_blank">就像天边最美的云朵</a></li>
            <li><a href="#" target="_blank">春天又来到了花开满山坡 </a></li>
            <li><a href="#" target="_blank">种下希望就会收获</a></li>
        </ul>
    </div>
    <div style="text-align:right;color:White;position:fixed;bottom:0px;right:0px;opacity: .70;font-size:14px;">
        ©KM 本系统由卡门信息中心研发。
    </div>
    <script type="text/javascript">
        var sh;
        function autoScroll(obj) {
            $(obj).find("ul").animate({
                marginTop: "-39px"
            }, 500, function () {
                $(this).css({ marginTop: "0px" }).find("li:first").appendTo(this);
            })
        }
        $(function () {
            shoptincount();
            shoptvlist();
            setInterval('shoptincount()', 20000);
            setInterval('shoptvlist()', 240000);
        });
        function shoptincount() {
            $.ajax({
                url: "http://219.135.99.176:58285/mobile/ajaxdata/Default.aspx",
                type: "POST",
                data: { aciton: 'shopincount' },
                timeout: 30000,
                dataType: "text",
                success: function (data) {
                    var msg = $.trim(data);
                    if (msg == "NO_DATA") {
                        alert("没有任何数据！");
                    } else {
                        var orderObj = JSON.parse(msg);
                        for (var i = 0; i < orderObj.length; i++) {
                            $("#shopcount").text(orderObj[i].shopcount);
                        }
                    }
                },
                error: function () {
                    alert("通讯超时,请检查网络!");
                }
            });
        }
        function shoptvlist() {
            $.ajax({
                url: "http://219.135.99.176:58285/mobile/ajaxdata/Default.aspx",
                type: "POST",
                data: { aciton: 'shoptvlist' },
                timeout: 30000,
                dataType: "text",
                success: function (data) {
                    var msg = $.trim(data);
                    if (msg == "NO_DATA") {
                        alert("没有任何数据！");
                    } else {
                        var orderObj = JSON.parse(msg);
                        el = document.getElementById('shoplist');
                        var html = "";
                        for (var i = 0; i < orderObj.length; i++) {
                            html += '<li><div>' + orderObj[i].orderid + '</div>'
                                       + '<div>' + orderObj[i].shopname + '</div>'
                                       + '<div>' + orderObj[i].startdate + '</div>'
                                       + '<div>' + orderObj[i].shoparea + '</div>'
                                       + '<div>' + orderObj[i].enddate + '</div>'
                                       + '<div>' + orderObj[i].remark + '</div>'
                                     + '</li>'
                        }
                        $("#shoplist").html(html);
                        if (orderObj.length > 8) {
                            clearInterval(sh); 
                            sh = setInterval('autoScroll(".maquee")', 8000);
                            //setInterval('autoScroll(".apple")', 2000);
                            //location.reload();
                        }
                    }
                },
                error: function () {
                    alert("通讯超时,请检查网络!");
                }
            });
        }
    </script>
</body>
</html>
